import typing
from PyQt5 import QtCore
from PyQt5.QtWidgets import QApplication,QWidget,QPushButton
import sys
from ui.Ui_btn import Ui_Form
class MyWidget(QWidget):
    def __init__(self):
        super().__init__()
        self.ui=Ui_Form()#ui创建对象
        self.ui.setupUi(self)
        self.ui_init()
    def on_btn_click(self):
        print("按钮按下")
    def ui_init(self):
        self.ui.btn.clicked.connect(self.on_btn_click)
        


if __name__=="__main__":
    app= QApplication(sys.argv)
    w=MyWidget()
    w.show()    
    sys.exit(app.exec_())